<?php 
$rows = $data['rows'];
$module = Request::get("module"); 
$group = Request::get("group");
$action = Request::get("action", "index");
$mg = $module . $group;
$ma = $module . $action;
?>
<div class='nav'>
	<div class='nav-list'>
	<ul>
		<li class='item <?=$module=="index"?"selected":"";?>'><a href='/'>Home Page</a> </li>
		<li class='item <?=$ma=="groupindex"?"selected":"";?>'><a href='/?module=group'>All Groups</a> </li>
		<?php foreach($rows as $r) { ?>
		<li class='item group <?=$mg=="config".$r['name'] ?"selected":"";?>'><a href='/?module=config&group=<?=$r['name'];?>'>&gt; <?=$r['name'];?></a></li>
		<?php } ?>	
		<li class='item  <?=$ma=="groupedit"?"selected":"";?>'><a href='/?module=group&action=edit'>Add Group</a></li>
		<li class='item <?=$ma=="clientindex"?"selected":"";?>'><a href='/?module=client'>Clients</a> </li>
		<?php foreach($rows as $r) { ?>
		<li class='item group <?=$mg=="client".$r['name'] ?"selected":"";?>'><a href='/?module=client&action=list&group=<?=$r['name'];?>'>&gt; <?=$r['name'];?></a></li>
		<?php } ?>	
	</ul>
	</div>
</div>
